local DropHelper = {}
local drop = require("config.drop")

function DropHelper.getDrops(dropId)
    local cfg = drop.get(dropId)
    assert(cfg, "can not found cfg in drop by id=" .. dropId)
    local result = {}
    for i = 1, 4 do
        local randNum = math.random(1, 1000)
        local randNum = randNum / 10
        if randNum <= cfg["pro_" .. i] then
            local param = {}
            param.type = cfg["type_" .. i]
            param.value = cfg["value_" .. i]
            param.size = cfg["size_" .. i]
            table.insert(result, param)
        end
    end
    return result
end

return DropHelper
